from flask import render_template,flash
from flask.views import View,MethodView

# 基于类的视图
class RegUser(View):
    methods = ['POST', 'GET']
    def dispatch_request(self):
        return render_template('reg.html')

class UserLogin(View):
    def dispatch_request(self):
        pass

# 基于方法的视图
class RegAdmin(MethodView):
    def get(self):
        flash('管理员用户注册')
        return render_template('reg.html')

    def post(self):
        return None

